<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Verb Meanings</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<script>
function togglePopup(material_id) {
  var popup = document.getElementById(material_id);
  popup.classList.toggle("show");
}
</script>

<link href="../docs-assets/Popups.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Verb Meanings' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../services.html">Services</a></li><li><a href="index.html">linguistics</a></li><li><a href="index.html#3">Chapter 3: VP Categories</a></li><li><b>Verb Meanings</b></li></ul></div>
<p class="purpose">To abstract the meaning of a verb.</p>

<ul class="toc"><li><a href="3-vm.html#SP1">&#167;1. What we abstract</a></li><li><a href="3-vm.html#SP3">&#167;3. How this module stores verb meanings</a></li><li><a href="3-vm.html#SP8">&#167;8. Recording where assigned</a></li><li><a href="3-vm.html#SP9">&#167;9. The regular meaning</a></li><li><a href="3-vm.html#SP10">&#167;10. The special meaning</a></li><li><a href="3-vm.html#SP11">&#167;11. Logging</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. What we abstract.</b>Because this module is concerned with the structure of sentences and not
their meanings, we don't really want to get into what verbs "mean". Instead,
we assume that the tool using this module will assign meanings in some way
that it understands and we do not: the data for the meaning of a verb will
be a pointer to <span class="extract"><span class="extract-syntax">VERB_MEANING_LINGUISTICS_TYPE</span></span>. (In Inform, this will be
a binary predicate.)
</p>

<p class="commentary">By default, there's no meaning at all:
</p>

<pre class="definitions code-font"><span class="definition-keyword">default</span> <span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> </span><span class="reserved-syntax">void</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. </b>The "reversal" of a verb is the meaning which exchanges its object and
subject. So the reverse meaning to "A likes B" is "A is liked by B", or
equivalent, "B likes A". We use the <span class="extract"><span class="extract-syntax">VERB_MEANING_REVERSAL_LINGUISTICS_CALLBACK</span></span>
to ask for a reversal to be performed when needed.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::reverse_VMT</span><button class="popup" onclick="togglePopup('usagePopup1')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup1">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::reverse_VMT</span></span>:<br/><a href="3-vm.html#SP9">&#167;9</a><br/>Diagrams - <a href="1-dgr.html#SP7">&#167;7</a><br/>Verb Usages - <a href="3-vu.html#SP12">&#167;12</a><br/>Noun Phrases - <a href="4-np.html#SP15_1">&#167;15.1</a><br/>Verb Phrases - <a href="4-vp.html#SP8_1">&#167;8.1</a></span></button><span class="plain-syntax">(</span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">recto</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">VERB_MEANING_REVERSAL_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">VERB_MEANING_REVERSAL_LINGUISTICS_CALLBACK</span><span class="plain-syntax">(</span><span class="identifier-syntax">recto</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">ifndef</span><span class="plain-syntax"> </span><span class="identifier-syntax">VERB_MEANING_REVERSAL_LINGUISTICS_CALLBACK</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">recto</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. How this module stores verb meanings.</b>We can now define an object to wrap up this abstracted idea of verb meaning:
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">typedef</span><span class="plain-syntax"> </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">take_meaning_reversed</span><span class="plain-syntax">; </span><span class="comment-syntax"> </span><span class="extract"><span class="extract-syntax">TRUE</span></span><span class="comment-syntax"> if this has been reversed</span>
<span class="plain-syntax">    </span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">regular_meaning</span><span class="plain-syntax">; </span><span class="comment-syntax"> in I7, this will be a binary predicate</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">special_meaning_holder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">special_meaning</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">take_meaning_from</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">struct</span><span class="plain-syntax"> </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">where_assigned</span><span class="plain-syntax">; </span><span class="comment-syntax"> at which sentence this is assigned to a form</span>
<span class="plain-syntax">} </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax">;</span>
</pre>
<ul class="endnotetexts"><li>The structure verb_meaning is private to this section.</li></ul>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. </b>All VMs begin as meaningless, which indicates (e.g.) that no meaning
has been specified.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::meaninglessness</span><button class="popup" onclick="togglePopup('usagePopup2')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup2">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::meaninglessness</span></span>:<br/><a href="3-vm.html#SP5">&#167;5</a>, <a href="3-vm.html#SP6">&#167;6</a><br/>Verbs - <a href="3-vrb.html#SP3_1">&#167;3.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">void</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">regular_meaning</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">special_meaning</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">take_meaning_reversed</span><span class="plain-syntax"> = </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">where_assigned</span><span class="plain-syntax"> = </span><span class="identifier-syntax">current_sentence</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::is_meaningless</span><button class="popup" onclick="togglePopup('usagePopup3')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup3">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::is_meaningless</span></span>:<br/>Verbs - <a href="3-vrb.html#SP12">&#167;12</a>, <a href="3-vrb.html#SP12_2">&#167;12.2</a><br/>Verb Usages - <a href="3-vu.html#SP15">&#167;15</a><br/>Prepositions - <a href="3-prp.html#SP10">&#167;10</a>, <a href="3-prp.html#SP11">&#167;11</a><br/>Verb Phrases - <a href="4-vp.html#SP5_3_1_1_1">&#167;5.3.1.1.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP7" class="function-link"><span class="function-syntax">VerbMeanings::follow_indirection</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">regular_meaning</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">special_meaning</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">TRUE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. </b>In practice, we create VMs here. Note that regular and special meanings are
alternatives to each other: you can't have both.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::regular</span><span class="plain-syntax">(</span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">rel</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP4" class="function-link"><span class="function-syntax">VerbMeanings::meaninglessness</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">regular_meaning</span><span class="plain-syntax"> = </span><span class="identifier-syntax">rel</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::special</span><span class="plain-syntax">(</span><span class="reserved-syntax">special_meaning_holder</span><span class="plain-syntax"> *</span><span class="identifier-syntax">sm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP4" class="function-link"><span class="function-syntax">VerbMeanings::meaninglessness</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">special_meaning</span><span class="plain-syntax"> = </span><span class="identifier-syntax">sm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. </b>You can, however, have neither one, if you instead choose to "indirect" the
meaning &mdash; this means saying "the same meaning as the regular sense of the base
form of a given verb", possibly reversed. Note that
</p>

<ul class="items"><li>(a) An indirected VM must never be used as the meaning for the base form of a
verb, and therefore
</li><li>(b) We can never have a situation where a VM indirects to a verb whose meaning
then indirects to something else.
</li></ul>
<p class="commentary">This might be used, for example, to set the meaning of "liked by" to be the
same as the meaning of "likes", but with subject and object reversed. The
indirection then ensures that if the meaning of "likes" changes, its associated
usages "is liking" and "is liked by" automatically change with it.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::indirected</span><button class="popup" onclick="togglePopup('usagePopup4')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup4">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::indirected</span></span>:<br/>Verb Usages - <a href="3-vu.html#SP6_1">&#167;6.1</a>, <a href="3-vu.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb</span><span class="plain-syntax"> *</span><span class="identifier-syntax">from</span><span class="plain-syntax">, </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">reversed</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP4" class="function-link"><span class="function-syntax">VerbMeanings::meaninglessness</span></a><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">take_meaning_reversed</span><span class="plain-syntax"> = </span><span class="identifier-syntax">reversed</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax">.</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax"> = </span><span class="identifier-syntax">from</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. </b>So the following function only needs to be used once.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::follow_indirection</span><button class="popup" onclick="togglePopup('usagePopup5')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup5">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::follow_indirection</span></span>:<br/><a href="3-vm.html#SP4">&#167;4</a>, <a href="3-vm.html#SP9">&#167;9</a>, <a href="3-vm.html#SP10">&#167;10</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vrb.html#SP13" class="function-link"><span class="function-syntax">Verbs::first_unspecial_meaning_of_verb_form</span></a><span class="plain-syntax">(</span>
<span class="plain-syntax">            </span><a href="3-vrb.html#SP11" class="function-link"><span class="function-syntax">Verbs::base_form</span></a><span class="plain-syntax">(</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. Recording where assigned.</b>This helps Inform with correctly locating problem messages.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::get_where_assigned</span><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_assigned</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::set_where_assigned</span><button class="popup" onclick="togglePopup('usagePopup6')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup6">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::set_where_assigned</span></span>:<br/>Verbs - <a href="3-vrb.html#SP12">&#167;12</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">, </span><span class="identifier-syntax">parse_node</span><span class="plain-syntax"> *</span><span class="identifier-syntax">pn</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">where_assigned</span><span class="plain-syntax"> = </span><span class="identifier-syntax">pn</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">internal_error</span><span class="plain-syntax">(</span><span class="string-syntax">"assigned location to null meaning"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. The regular meaning.</b>This is not as simple as returning the <span class="extract"><span class="extract-syntax">regular_meaning</span></span> field, because we
have to follow any indirection, and reverse if necessary.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::get_regular_meaning</span><button class="popup" onclick="togglePopup('usagePopup7')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup7">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::get_regular_meaning</span></span>:<br/><a href="3-vm.html#SP11">&#167;11</a><br/>Verb Phrases - <a href="4-vp.html#SP7">&#167;7</a>, <a href="4-vp.html#SP8_1">&#167;8.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="identifier-syntax">rev</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_reversed</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP7" class="function-link"><span class="function-syntax">VerbMeanings::follow_indirection</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">rel</span><span class="plain-syntax"> = </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">regular_meaning</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">rev</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">rel</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vm.html#SP2" class="function-link"><span class="function-syntax">VerbMeanings::reverse_VMT</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">rel</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">rel</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::get_regular_meaning_of_form</span><button class="popup" onclick="togglePopup('usagePopup8')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup8">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::get_regular_meaning_of_form</span></span>:<br/>Verb Usages - <a href="3-vu.html#SP12">&#167;12</a><br/>Noun Phrases - <a href="4-np.html#SP15_1">&#167;15.1</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_form</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vf</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><a href="3-vm.html#SP9" class="function-link"><span class="function-syntax">VerbMeanings::get_regular_meaning</span></a><span class="plain-syntax">(</span>
<span class="plain-syntax">        </span><a href="3-vrb.html#SP13" class="function-link"><span class="function-syntax">Verbs::first_unspecial_meaning_of_verb_form</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vf</span><span class="plain-syntax">));</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. The special meaning.</b>This is also not as simple as returning the <span class="extract"><span class="extract-syntax">regular_meaning</span></span> field, because
again we have to follow any indirection. Since we have no good way to modify
a special meaning function, we have to provide a function to tell the user
whether to reverse what that function does.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">special_meaning_holder</span><span class="plain-syntax"> *</span><span class="function-syntax">VerbMeanings::get_special_meaning</span><button class="popup" onclick="togglePopup('usagePopup9')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup9">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::get_special_meaning</span></span>:<br/>Verbs - <a href="3-vrb.html#SP12_2">&#167;12.2</a>, <a href="3-vrb.html#SP13">&#167;13</a>, <a href="3-vrb.html#SP14">&#167;14</a><br/>Verb Phrases - <a href="4-vp.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP7" class="function-link"><span class="function-syntax">VerbMeanings::follow_indirection</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">special_meaning</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>

<span class="reserved-syntax">int</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::get_reversal_status_of_smf</span><button class="popup" onclick="togglePopup('usagePopup10')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup10">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::get_reversal_status_of_smf</span></span>:<br/>Verb Phrases - <a href="4-vp.html#SP7">&#167;7</a></span></button><span class="plain-syntax">(</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">FALSE</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_reversed</span><span class="plain-syntax">;</span>
<span class="plain-syntax">}</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. Logging.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="reserved-syntax">void</span><span class="plain-syntax"> </span><span class="function-syntax">VerbMeanings::log</span><button class="popup" onclick="togglePopup('usagePopup11')"><span class="comment-syntax">?</span><span class="popuptext" id="usagePopup11">Usage of <span class="code-font"><span class="function-syntax">VerbMeanings::log</span></span>:<br/>Linguistics Module - <a href="1-lm.html#SP3_2">&#167;3.2</a></span></button><span class="plain-syntax">(</span><span class="identifier-syntax">OUTPUT_STREAM</span><span class="plain-syntax">, </span><span class="reserved-syntax">void</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vvm</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> = (</span><span class="reserved-syntax">verb_meaning</span><span class="plain-syntax"> *) </span><span class="identifier-syntax">vvm</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax"> == </span><span class="identifier-syntax">NULL</span><span class="plain-syntax">) { </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;none&gt;"</span><span class="plain-syntax">); </span><span class="reserved-syntax">return</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_reversed</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"reversed-"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"&lt;$w&gt;="</span><span class="plain-syntax">, </span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">take_meaning_from</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="constant-syntax">VERB_MEANING_LINGUISTICS_TYPE</span><span class="plain-syntax"> *</span><span class="identifier-syntax">m</span><span class="plain-syntax"> = </span><a href="3-vm.html#SP9" class="function-link"><span class="function-syntax">VerbMeanings::get_regular_meaning</span></a><span class="plain-syntax">(</span><span class="identifier-syntax">vm</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">m</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">CORE_MODULE</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"(%S)"</span><span class="plain-syntax">, </span><span class="identifier-syntax">m</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">debugging_log_name</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        #</span><span class="reserved-syntax">else</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"(regular)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">endif</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">vm</span><span class="plain-syntax">-&gt;</span><span class="element-syntax">special_meaning</span><span class="plain-syntax">) </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"(special)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">WRITE</span><span class="plain-syntax">(</span><span class="string-syntax">"(meaningless)"</span><span class="plain-syntax">);</span>
<span class="plain-syntax">}</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="3-vrb.html">&#10094;</a></li><li class="progresschapter"><a href="P-wtmd.html">P</a></li><li class="progresschapter"><a href="1-lm.html">1</a></li><li class="progresschapter"><a href="2-adj.html">2</a></li><li class="progresscurrentchapter">3</li><li class="progresssection"><a href="3-vrb.html">vrb</a></li><li class="progresscurrent">vm</li><li class="progresssection"><a href="3-sm.html">sm</a></li><li class="progresssection"><a href="3-vu.html">vu</a></li><li class="progresssection"><a href="3-prp.html">prp</a></li><li class="progresssection"><a href="3-aoc.html">aoc</a></li><li class="progresssection"><a href="3-apoo.html">apoo</a></li><li class="progresschapter"><a href="4-np.html">4</a></li><li class="progressnext"><a href="3-sm.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

